<template>
  <div class="xtx-bread-item">
    <RouterLink v-if="to" :to="to">
      <slot />
    </RouterLink>
    <!-- 插槽指的是传进来的名字 -->
    <span v-else>
      <slot />
    </span>
  </div>
  <!-- <i class="iconfont icon-angle-right"></i> -->
</template>

<script>
export default {
  name: 'XtxBreadItem',
  props: {
    to: {
      type: [String, Object],
      default: ''
    }
  }
}
</script>
